package com.newvpn.fastbest.zenith.dialog;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.newvpn.fastbest.zenith.R;


public class AddTimeReusltDialog extends BaseDialog {

    private Button ok;

    private static final String TIME = "TIME";

    public AddTimeReusltDialog() {

    }

    public static AddTimeReusltDialog newInstance(String min) {
        AddTimeReusltDialog fragment = new AddTimeReusltDialog();
        Bundle args = new Bundle();
        args.putString(TIME, min);
        fragment.setArguments(args);
        return fragment;
    }


    @Override
    protected int layout() {
        return R.layout.v_dialog_addtime_result;
    }

    @Override
    protected void init(View view) {
        view.findViewById(R.id.ok).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
            }
        });
        String info = getArguments().getString(TIME);
        TextView tvResult = view.findViewById(R.id.tvResult);
        if (info.equals("0")){
            tvResult.setText(R.string.add_time_zero);
        }else {
            tvResult.setText(String.format(getString(R.string.gift_result),info));
        }



    }




}

